home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 3 / AGA Experience Volume 3 (1997)(NFA - SAdENESS)[!].iso / software / utilities / graphics / pg_patch2a / update-photogenics2 next >
Text File  |  1996-07-03  |  5KB  |  221 lines

  1.  
  2.  
  3. ; Photogenics Autopatcher script. © Almathera 1996. All rights reserved.
  4.  
  5. ; $VER: what_the_fuck?-3am-mix 1.0 (3.07.96)
  6.  
  7. ; Authored & Hacked To Death by thp/©!truS'96
  8.  
  9. ;    grungebeat. flexifoils. pain. adrenalin. alcohol. phoenix '96. see y'there.
  10.  
  11. (set MATHS (database "fpu") )
  12.  
  13. (set #NOT-OLD-AND-INFERIOR "Installing way-cool new-improved stuff.")
  14.  
  15. (procedure do_a_patch
  16.     (if (exists ("%s%s" PATH FILE))
  17.         (
  18.         (working ("Patching: %s\n\n" FILE))
  19.  
  20.         (run ( ("c/spatch -o%s%s -p%s%s.diff %s%s" PATH FILE PATCH FILE ORIGINAL FILE)))
  21.         )
  22.     )
  23.     (if (exists ("%s%s" PATH2 FILE))
  24.         (
  25.         (working ("Patching: %s\n\n" FILE))
  26.  
  27.         (run ( ("c/spatch -o%s%s -p%s%s.diff %s%s" PATH2 FILE PATCH FILE ORIGINAL FILE)))
  28.         )
  29.     )
  30. )
  31.  
  32. (message
  33.     "\nThis installer will patch the main Photogenics core and libraries,"
  34.     " effects, a couple of GIOs, and put in some new online help and"
  35.     " rexx scripts. It can spot things you`ve moved from the Data drawers into Storage"
  36.     " in your Photogenics setup, and patch them (hence we install everything"
  37.     " as default so you won`t need to re-apply this patch as long as you`ve"
  38.     " not deleted things from your release 2 install)"
  39.     "\n\n(The installer also makes the not unreasonable assumption that Photogenics 2"
  40.     " is actually installed on your box ;-)"
  41. )
  42.  
  43. (if (= MATHS "NOFPU")
  44.     (set #FPU-PROMPT
  45.         (cat "\n\n\nHmmmmm. The installer reckons you've not got an"
  46.              " FPU installed in your machine. Is this correct?")
  47.         )
  48.     (set #FPU-PROMPT
  49.         (cat "\n\n\nArhar. The installer reckons you've got an FPU"
  50.              " installed and activated in your machine. Is this"
  51.              " correct?")
  52.         )
  53. )
  54.  
  55. (set FPU
  56.     (askbool
  57.         (prompt #FPU-PROMPT)
  58.         (help "\n\nWell, either you've got one, or you haven't...")
  59.         (choices "No FPU installed" "FPU installed")
  60.     )
  61. )
  62.  
  63. (askdisk
  64.     (prompt "Please insert the Photogenics 2 CD")
  65.     (dest "PGSCD")
  66.     (help @askdisk-help)
  67. )
  68.  
  69.                           ; loop for each one...
  70.  
  71. (set PATH "Photogenics:")
  72. (set PATH2 "Photogenics:data")
  73. (set PATCH "diff/")
  74. (set ORIGINAL "PGSCD:")
  75.  
  76. (set LOOP-FLAG -1)
  77.  
  78. (while (< LOOP-FLAG 30 )
  79.     (
  80.  
  81.     (set LOOP-FLAG (+ 1 LOOP-FLAG ))
  82.  
  83.     (set FILE
  84.         (select LOOP-FLAG
  85.  
  86.             "Photogenics"        ; 0
  87.  
  88.             "libs/pgsrexx.library"  ; 1
  89.  
  90.             "GIO/ILBM.gio"        ; 2
  91.             "GIO/Raw.gio"
  92.             "GIO/Text.gio"
  93.  
  94.             "Effects/AutoContrast.efx" ; 5
  95.             "Effects/Balance.efx"
  96.             "Effects/Blur.efx"
  97.             "Effects/Edge.efx"
  98.             "Effects/Gradient.efx"
  99.             "Effects/Greyscale.efx"
  100.             "Effects/Histogram.efx"
  101.             "Effects/Hue&Saturation.efx"
  102.             "Effects/LineStrokes.efx"
  103.             "Effects/Median.efx"
  104.             "Effects/MixColour.efx"
  105.             "Effects/Negative.efx"
  106.             "Effects/Noise.efx"
  107.             "Effects/Paper.efx"
  108.             "Effects/Plasma.efx"
  109.             "Effects/Pyramid.efx"
  110.             "Effects/RadialBlur.efx"
  111.             "Effects/RemoveIsolated.efx"
  112.             "Effects/Ripples.efx"
  113.             "Effects/Roll.efx"
  114.             "Effects/SheetMetal.efx.efx"
  115.             "Effects/Tiles.efx.efx"
  116.  
  117.                        ; stuff that's ffp-sensitive...
  118.  
  119.             "libs/pgs.library"        ; 27
  120.  
  121.             "effects/Fractal.efx"    ; 28
  122.             "Effects/Perspective.efx"
  123.             "Effects/Wave.efx"
  124.  
  125.         )
  126.     )
  127.  
  128.            ; wind thru the list changing paths on the fly
  129.  
  130.     (if (= 1 LOOP-FLAG)
  131.         (
  132.         (set PATH "Photogenics:data/")
  133.         (set PATH2 "Photogenics:Storage/")
  134.         (set PATCH "diff/data/")
  135.         (set ORIGINAL "PGSCD:data/")
  136.         )
  137.     )
  138.  
  139.     (if (= 27 LOOP-FLAG)
  140.         (
  141.         (if (= 1 FPU)
  142.             (
  143.             (set PATH "Photogenics:Data/")
  144.             (set PATH2 "Photogenics:Storage/")
  145.             (set PATCH "diff/dataffp/")
  146.             (set ORIGINAL "PGSCD:DataFFP/")
  147.             )
  148.  
  149.             (
  150.             (set PATH "Photogenics:Data/")
  151.             (set PATH2 "Photogenics:Storage/")
  152.             (set PATCH "diff/data/")
  153.             (set ORIGINAL "PGSCD:Data/")
  154.             )
  155.         )
  156.         )
  157.     )
  158.  
  159.     (do_a_patch)
  160.  
  161.     )
  162. )
  163.  
  164.  
  165. ; okay, nuked from orbit, let's do the new stuff...
  166.  
  167. (if ( = (exists "photogenics:data/help" (noreq) ) 2)
  168.     (copyfiles
  169.         (prompt #NOT-OLD-AND-INFERIOR)
  170.         (help @copyfiles-help)
  171.         (source "new/data/help")
  172.         (dest "photogenics:data/help")
  173.         (confirm)
  174.         (all)
  175.     )
  176.     (message
  177.         "\n\nHmmmm. You don`t seem to have the on-line help installed on"
  178.         " your system - there`s been some documentation changes and"
  179.         " updates in the 2a release that you won`t know about, so"
  180.         " you`ll need to install the on-line help and reapply this"
  181.         " patch to find out about the new bits."
  182.     )
  183. )
  184.  
  185. (copyfiles
  186.     (prompt #NOT-OLD-AND-INFERIOR)
  187.     (help @copyfiles-help)
  188.     (source "new/data/scripts")
  189.     (dest "photogenics:data/scripts")
  190.     (confirm)
  191.     (all)
  192. )
  193.  
  194. (copyfiles
  195.     (prompt #NOT-OLD-AND-INFERIOR)
  196.     (help @copyfiles-help)
  197.     (source "new/data/effects")
  198.     (dest "photogenics:data/effects")
  199.     (confirm)
  200.     (all)
  201.     (infos)
  202. )
  203.  
  204. (copyfiles
  205.     (prompt #NOT-OLD-AND-INFERIOR)
  206.     (help @copyfiles-help)
  207.     (source "new/data/lastmin.HTM")
  208.     (dest "photogenics:data")
  209.     (confirm)
  210. )
  211.  
  212. (run "Avail >nil: <nil: FLUSH") ; now wash your hands....
  213.  
  214. (message
  215.     "\n\nPhotogenics 2a has now been patched into your existing"
  216.     " installation."
  217. )
  218.  
  219. (exit (quiet))
  220.  
  221.